﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using System.Data;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        XmlDocument xmlVerisi = new XmlDocument();

        xmlVerisi.Load("http://www.tcmb.gov.tr/kurlar/today.xml");
        decimal dolar = Convert.ToDecimal(xmlVerisi.SelectSingleNode(string.Format("Tarih_Date/Currency[@Kod='{0}']/ForexSelling", "USD")).InnerText.Replace('.', ','));

        decimal Euro = Convert.ToDecimal(xmlVerisi.SelectSingleNode(string.Format("Tarih_Date/Currency[@Kod='{0}']/ForexSelling", "EUR")).InnerText.Replace('.', ','));
        Label3.Text = dolar.ToString();
        Label4.Text = Euro.ToString();


        DataSet ds = new DataSet();
        ds.ReadXml("http://xml.altinkaynak.com.tr/doviz.xml");
        DataTable dt = ds.Tables[0];

        //GridView1.DataSource = dt;

     
        

       

    }
  
}
